<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-for</title>
  <script src="../../js/vue.js"></script>
</head>

<body>
  <div id="app">
    <div>遍历时, for of和for in 没有区别</div>
    <ul>
      <li v-for="(li,i) of names" :key="i">{{i+1}} - {{li}}</li>
    </ul>
    <ul>
      <li v-for="(value,key) in info" :key="key">{{key}}: {{value}}</li>
    </ul>
  </div>
  <script>
    let vm = new Vue({
      el: "#app",
      data: {
        names: ["赵灵儿", "林月如", "阿奴"],
        info: {
          name: "李逍遥",
          age: 18
        }
      },
      methods: {

      }
    })
    console.log(vm)
  </script>
</body>

</html>